package com.cjm.one.webmanager.service.system.impl;

import com.cjm.one.model.system.entity.SysResource;
import com.cjm.one.model.system.vo.SysResourceVo;
import com.cjm.one.system.client.SysMenuClient;
import com.cjm.one.webmanager.service.system.SysMenuService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements SysMenuService {
    @Resource
    private SysMenuClient sysMenuClient;
    @Override
    public List<SysResourceVo> list(SysResource sysResource) {
        return sysMenuClient.list(sysResource).getData();
    }

    @Override
    public Boolean updateById(SysResource sysResource) {
        return sysMenuClient.update(sysResource).getData();
    }

    @Override
    public Boolean save(SysResource sysResource) {
        return sysMenuClient.add(sysResource).getData();
    }

    @Override
    public Boolean removeById(Long id) {
        return sysMenuClient.delete(id).getData();
    }

    @Override
    public SysResource getById(Long id) {
        return sysMenuClient.getById(id).getData();
    }
}
